home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
User's Choice Windows CD
/
User's Choice Windows CD (CMS Software)(1993).iso
/
utility3
/
wtj008.zip
/
OBJECTS.ZIP
/
TESTSCPP.CPP
< prev
next >
Wrap
C/C++ Source or Header
|
1992-05-17
|
869b
|
42 lines
#include <stdio.h>
#include <stdlib.h>
#include <iostream.h>
#include <windows.h>
#include "tstrings.h"
void far_cout(LPSTR s)
{
while (*s)
cout << *s++;
cout << '\n';
}
#pragma argsused
int PASCAL WinMain(HANDLE hInstance, HANDLE hPrevInstance,
LPSTR lpszCmdLine, int cmdShow)
{
TString string1, string2;
_InitEasyWin();
//instantiate the TStrings
if (! TStringInit("This is string one", string1) ) {
cout << "Unable to instantiate string1\n";
return 1;
}
if (! TStringInit("This is string two", string2) ) {
cout << "Unable to instantiate string2\n";
return 2;
}
//call the sGetString "method"
far_cout(string1.sGetString(string1));
far_cout(string2.sGetString(string2));
//call the sDone "destructor"
string2.sDone(string2);
string1.sDone(string1);
return 0;
}